#ifndef __MEMORY_H__
#define __MEMORY_H__

#include <device/device.h>

#define RISCV_MEM_ATTR_READABLE     (1 << 0)
#define RISCV_MEM_ATTR_WRITABLE     (1 << 1)

struct mem_t{
    st_device device;   // 基础区域
    uint8_t * mem;      // 存储区域
};

mem_t * mem_create(const char * name,
                  riscv_word_t base,
                  riscv_word_t size,
                  riscv_word_t attr);

#endif
